/**
 * 
 */
package properties;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * This class provides the property administration for the framework. The
 * properties a read from the file optimization.properties.
 * 
 * @author Kevin Wagner
 * @version 1.0
 */
public class JOFProperties extends Properties {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5018807503395633119L;

	/**
	 * Creates a new property object and tries to load from file
	 * Optimization.properties.
	 */
	public JOFProperties() {
		try {
			FileInputStream in = new FileInputStream("Optimization.properties");
			this.load(in);
			in.close();
		} catch (Exception e) {

		}
	}

	/**
	 * @throws IOException
	 */
	public void export() throws IOException {
		FileOutputStream out = new FileOutputStream("Optimization.properties");
		this.store(out, "---Configuration for the JOF Framework---");
		out.close();
	}

}
